import { createRouter, createWebHistory } from 'vue-router'
import Layout from '../Layout/Layout.vue'
import Login from '@/views/Login.vue'


const routes = [
  {
    path: '/',
    name: 'Login',
    component: Login,
  },
  {
    path: '/#',
    name: 'Layout',
    component: Layout,
    redirect: '/#/user',
    children : [
      {
        path: '/user',
        name: 'User',
        component: () => import("@/views/User"),
      },
      {
        path: '/teacher',
        name: 'Teacher',
        component: () => import("@/views/Teacher"),
      },
      {
        path: '/score',
        name: 'Score',
        component: () => import("@/views/Score"),
      },
      {
        path: '/category',
        name: 'Category',
        component: () => import("@/views/Category"),
      },
      {
        path: '/complain',
        name: 'Complain',
        component: () => import("@/views/Complain"),
      },
      {
        path: '/goods',
        name: 'Goods',
        component: () => import("@/views/Goods"),
      },
      {
        path: '/notice',
        name: 'Notice',
        component: () => import("@/views/Notice"),
      },
      {
        path: '/order',
        name: 'Order',
        component: () => import("@/views/Order"),
      }

    ]
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
